package org.vergil.core.designpattern.strategy;

/**
 * Created by vergil on 17-3-25.
 */
public class Client {
    public static void main(String args[]) {
        MovieTicket mt = new MovieTicket();
        double originalPrice = 60.0;
        double currentPrice;

        ChildrenDiscount childrenDiscount = new ChildrenDiscount();

        mt.setDiscount(childrenDiscount);

        mt.setPrice(originalPrice);
        System.out.println("原始价为：" + originalPrice);
        System.out.println("---------------------------------");

        currentPrice = mt.getPrice();
        System.out.println("折后价为：" + currentPrice);
    }
}
